home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / JOHNLOVE / C_SOURCE / CMYBAR.C < prev    next >
Text File  |  1992-02-03  |  907b  |  41 lines

  1. /*********************************************************
  2.  "CmyBar.c"
  3.  
  4.  by John A. Love, III [Washington Apple Pi Users' Group]
  5.  
  6.  using Symantec's "THINK C", v 5.0.1
  7.  ... as derived from their "TCL Starter" files
  8.  *********************************************************/
  9.  
  10.  
  11.  
  12.  
  13. #include <Commands.h>
  14. #include <Balloons.h>
  15.  
  16. #include "CmyBar.h"
  17.  
  18.  
  19.  
  20. long    CmyBar::FindCmdNumber (short MENUid, short itemNo)    {
  21. /* There are problems in TCL's handling of the Balloon Help MENU.
  22. ** For example, IBartender calls _GetMenu(id) which is NOT valid
  23. ** for the Help MENU.  Further, the problems snowball from there. */
  24.  
  25.         long    result;
  26.         
  27.         
  28.     result = inherited::FindCmdNumber(MENUid, itemNo);
  29.     if (result == cmdNull && MENUid == kHMHelpMenuID)
  30.         // Since kHMHelpMenuID is already negative, do as _MenuSelect:
  31.         result = ( (long)MENUid << 16 ) + itemNo;
  32.     
  33.     return (result);
  34.  
  35. }    /* FindCmdNumber */
  36.  
  37.  
  38.  
  39.  
  40. /* end: "CmyBar.c" */
  41.